
<include file="Public/header"/> 

<!-- start: Content -->
<div id="content" class="span10">
    <!--面包屑开始-->
    <ul class="breadcrumb">
        <li>
            <i class="icon-home"></i>
            <a href="index.html">主页</a> 
            <i class="icon-angle-right"></i>
        </li>
        <li><a href="#">科目管理</a></li>
    </ul>
    <!--面包屑结束-->

    <!--内容区域开始-->
    <div class="row-fluid">		
        <div class="box span12">
            <div class="box-header" data-original-title>
                <h2><i class="halflings-icon user"></i><span class="break"></span>{$Think.session.user.user_name} </h2>
                <div class="box-icon">
                    <a href="__APP__/Home/Index/insert_subject" class="btn-setting" id="subject_add"><i class="halflings-icon plus"></i></a>

                    <a href="#" class="btn-minimize"><i class="halflings-icon chevron-up"></i></a>
                </div>
            </div>
            <div class="box-content">
                <table class="table table-striped table-bordered">
                    <thead>
                        <tr>
                            <th>科目ID</th>
                            <th>科目名</th>
                            <th>科目图片</th>
                            <th>管理</th>
                        </tr>
                    </thead>   
                    <tbody>
                    <volist name="list" id="vo"> 
                        <tr>
                            <td class="center column_id">{$vo.id}</td>
                            <td class="center column_name">{$vo.name}</td>
                            <td class="center" style="cursor: pointer" >
                                 <img src="{$vo.image}" class="column_link" alt=" " title="{$vo.name}" style="width:80px; height: 80px;">
                            </td>
                            <td class="center">
                                <a class="btn btn-info edit-column" href="__APP__/Home/index/save?id={$vo.id}">
                                    <i  class="halflings-icon white edit"></i>  
                                </a>
                                <a class="btn btn-danger" href="__APP__/Home/index/delete?id={$vo.id}" onClick="return confirm('确认要删除？');" >
                                    <i class="halflings-icon white trash"></i> 
                                </a>
                                <a href="__APP__/Home/Questions/index?id={$vo.id}" class="btn btn-warning" data-rel="popover">题库信息</a>
                            </td>

                        </tr>
                    </volist>

                    </tbody>
                </table>            
            </div>
            <div class="pagination"> 
                {$page}
            </div>
        </div><!--/span-->

    </div><!--/row-->

     <!--修改模态窗口开始-->
    <div class="modal hide fade" id="images-link-model">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">×</button>
            <h3 id="image-link-title">图片预览</h3>
        </div>
        <img style="height:400px;width:100%" id="model-link-iamges"/>
    </div>
    <!--修改模态窗口结束-->
    
    <script>
 
    $(function() {
           /**
             *点击图片 
             */
           $('.column_link').click(function(e){
               e.preventDefault();
               $("#model-link-iamges").attr("src",$(this).attr("src"));
               $("#image-link-title").html($(this).attr("title"));
               $('#images-link-model').modal('show');
           });
           /**
             *添加科目 
             */
            $("#subject_add").click(function() {
                  window.location.href = $("#subject_add").attr("href");
            });
      })
    </script>
    <!--内容区域结束-->
    <include file="Public/footer"/>             





